﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace CDFWPUG.Model
{
    public class Meeting
    {
        public int ID { get; set; }
        public String Type { get; set; }
        public string Date { get; set; }
        public string Time { get; set; }
        public string Title { get; set; }
        public string Description { get; set; }
        public List<AgendaItem> Agenda { get; set; }
        public Address MeetingVenue { get; set; }


        public String Colour
        {
            get
            {
                String temp;
                switch (this.MeetingVenue.Town)
                {
                    case "Cardiff":
                        temp = "#FF45B217";
                        break;
                    case "London":
                        temp = "Red";
                        break;
                    case "Manchester":
                        temp = "Orange";
                        break;
                    default:
                        temp = "Blue";
                        break;

                }

                return temp;
            }

        }


        public Meeting()
        {

        }

        private Color GetThisColour(string colorString)
        {
            Color returnColour;
            Type colortype = (typeof(Color));
            if (colortype.GetProperty(colorString) != null)
            {
               Object o = colortype.InvokeMember(colorString, System.Reflection.BindingFlags.GetProperty, null, null, null);

               if (o != null)
               {
                   returnColour = (Color)o;
               }
               else
               {
                   returnColour = Colors.Blue;
               }

            }
            else
            {
                returnColour = Colors.Blue;
            }

            return returnColour;
        }


    }

}
